1. Field of the Invention
The present invention relates to a method of and an apparatus for generating mask data representing a mask area of a specific color in a color image.
2. Description of the Related Art
In prepress process, some image processing, such as color change or sharpness enhancement, are sometimes required only for an area of a specific color in an original color image such as a photograph. For example, only a color of clothes on a model is to be changed in some cases, and sharpness enhancement is to be executed in an area other than the flesh tint of the model in other cases. When a desired processing is executed (or not executed) only for an area of a specific color in the original color image, a cutout mask representing the specific color area is prepared.
FIGS. 1(A) and 1(B) illustrate an original color image and a desirable mask. The original color image shown in FIG. 1(A) is a photograph of a model with black hair in yellow cloths with rose patterns. The rose patterns include white and pink petals and green leaves surrounding the petals. FIG. 1(B) shows a mask including a yellow area and a green area of the clothes.
According to a conventional method of preparing a color mask by analyzing colors of a color image, colors of pixels in a possible mask area are analyzed to determine a primary component axis of the colors in a three dimensional color space. The pixels which have a greater component other than the primary component are to be excluded from the mask area. That is, when the color of a pixel is far from the primary component axis, the pixel is excluded from the mask area.
However, it is difficult for the conventional method to distinguish a flesh tint area from a yellow area because the flesh tint color has a considerable fraction of yellow component. Accordingly, it is difficult to produce the mask area as shown in FIG. 1(B), which includes an yellow area while excluding a flesh tint area of FIG. 1(A). Such problem is commonly observed when one of two colors having relatively close hues is specified as a mask area while the other color is to be excluded from the mask area.